﻿using System;

namespace NetMicro.Domains.Strategy
{
    /// <summary>
    /// 默认分表策略
    /// </summary>
    public class DefaultSuffixTableStrategy : ISqlTableStrategy
    {
        /// <summary>
        /// 获取后缀分表名
        /// </summary>
        /// <param name="subTableValue"></param>
        /// <param name="tableName"></param>
        /// <param name="attribute"></param>
        /// <returns></returns>
        public string ConvertToTable(object subTableValue, string tableName, Attribute attribute)
        {
            return $"{tableName}_{subTableValue}";
        }
    }
}
